//
//  LostPhotoCollectionViewCell.m
//  Find
//
//  Created by lanou3g on 15/10/27.
//  Copyright © 2015年 Reiko. All rights reserved.
//

#import "LostPhotoCollectionViewCell.h"

@implementation LostPhotoCollectionViewCell




- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubViewCell];
    }
    return self;
}

- (void)addSubViewCell
{
    // 图片
    self.LostPhotoImage = [[UIImageView alloc] initWithFrame:(CGRectMake(0, 0, (kScreenWidth - 4 * 20) / 3, self.contentView.height - 20))];
    self.LostPhotoImage.image = [UIImage imageNamed:@"hi_4"];
    // 将图片边角变圆
    self.LostPhotoImage.layer.masksToBounds = YES;
    self.LostPhotoImage.layer.cornerRadius = self.LostPhotoImage.frame.size.height / 8;
    [self.contentView addSubview:self.LostPhotoImage];
    
    // 位置定位图
    UIImageView * lostPhotoCellImage = [[UIImageView alloc] initWithFrame:(CGRectMake(0, self.LostPhotoImage.bottom + 2, 15, 17))];
    lostPhotoCellImage.image = [UIImage imageNamed:@"iconfont-address-@1x"];
    [self.contentView addSubview:lostPhotoCellImage];
    
    // 地址
    self.LostPhotoAddress = [[UILabel alloc] initWithFrame:(CGRectMake(lostPhotoCellImage.right + 2, self.LostPhotoImage.bottom + 5, (kScreenWidth - 4 * 20) / 3 - 10 - 5, 15))];
    self.LostPhotoAddress.text = @"中国河南安阳市文峰区";
    self.LostPhotoAddress.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:self.LostPhotoAddress];
    
}















@end
